<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="sdfi.lee.DAO.FileDAO"%>
<%@page import="sdfi.lee.Properties.ReadXMLFromString"%>
<%@page import="sdfi.lee.ReaderFromDisk.ReaderNotice"%>
<%@page import="sdfi.lee.ReaderFromDisk.ReaderRoll"%>
<%@page import="sdfi.lee.DAO.QuestionDAO"%>
<%@page import="sdfi.lee.Entity.Question"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="../css/index.css" rel="stylesheet" type="text/css" />
<link href="../css/level.css" rel="stylesheet" type="text/css" />
<title></title>
</head>
<body>
	<%
		String path=request.getParameter("path");
		ReadXMLFromString rxfs=null;
		String rel=new FileDAO().getRollNoticeByFilepath(path);
		List<Question> qust=new QuestionDAO().getAllUserQuest(3,1,1);
		request.setAttribute("qust",qust);
	%>
	<div class="divhead">当前位置:<a href="<c:url value='/index.jsp' />">首页</a>
		&gt;&nbsp;智能问答&gt;&nbsp;查看原文
	</div>
	<div id="divshowcontain">
    	<div id="divleft">
		<%
			if(rel==null||"".equals(rel))
			{
		%>
			<div class="div_content_title">暂无资源</div>
							<div class="div_content_fenge1"></div>
								<div class="div_content_fenge2"></div>
			
			<%
			}
			else{
				rxfs=new ReadXMLFromString();
				rxfs.setSource("<root>"+rel+"</root>");
				if(path.contains("patent"))
				{
					
					
					
					
					//专利
			%>
				<!-- 专利 -->
						<div class="div_content_title"><% out.println(rxfs.readerValueByNode("/root/name")); %></div>
							<div class="div_content_fenge1"></div>
								<div class="div_content_fenge2"></div>
									<div class="div_detail">
				<table style="width:100%;">
					<tr>
						<td>
							专利名：<%=rxfs.readerValueByNode("/root/name") %>
							<a href="<%=rxfs.readerValueByNode("/root/sourceUrl") %>" target="_blank"><font color="red">查看来源</font></a>
						</td>
					</tr>
					<tr>
						<td>
							专利号:<%=rxfs.readerValueByNode("/root/applyNum") %>
						</td>
					</tr>
					<tr>
						<td>
							专利类别：<%=rxfs.readerValueByNode("/root/categoryNum") %>
						</td>
					</tr>
					<tr>
						<td>
							作者：<%=rxfs.readerValueByNode("/root/designer") %>
						</td>
					</tr>
					<tr>
						<td>
							单位：<%=rxfs.readerValueByNode("/root/address") %>
						</td>
					</tr>
					<tr>
						<td>
							摘要：<%=rxfs.readerValueByNode("/root/abstracts") %> &nbsp;&nbsp;&nbsp;
						</td>
					</tr>
				</table>
				</div>
			<%
		
				}
				else if(path.contains("journal"))
				{
					
				//期刊
		%>	
			<div class="div_content_title"><%=rxfs.readerValueByNode("/root/title") %></div>
			<div class="div_content_fenge1"></div>	<div class="div_content_fenge2"></div>
				<div class="div_detail">
			<table style="width:100%;">
						<tr>
							<td>摘要：<%=rxfs.readerValueByNode("/root/abstracts") %>&nbsp;&nbsp;&nbsp;
								<a href="<%=rxfs.readerValueByNode("/root/source") %>" target="_blank"><font color="red">查看来源</font></a>
							</td>
						</tr>
						<tr>
							<td>作者：<%=rxfs.readerValueByNode("/root/author") %>
							</td>
						</tr>
						<tr>
							<td>
							机构:<%
								
								 out.print(rxfs.readerValueByNode("/root/organization"));
							%>
							</td>
						</tr>
						<tr>
					
					
					</table>
					</div>
		<%	
				}else if(path.contains("notice"))
				{
					//通知公告
		%>			
					<div class="div_content_title"><%=rxfs.readerValueByNode("/root/title") %></div>
		<div class="div_content_fenge1"></div>
		<div class="div_content_date"><%=rxfs.readerValueByNode("/root/modifytime") %></div>
		<div class="div_content_fenge2"></div>
		<div>
			<div class="div_detail">
				<%=rxfs.readerValueByNode("/root/body") %>
			</div>
				
			</div>
		<%
				}else if(path.contains("/root/policy"))
				{
					//政策
		%>
				
			
		<div class="div_content_title"><%=rxfs.readerValueByNode("/root/title") %></div>
		<div class="div_content_fenge1"></div>
		<div class="div_content_date"><%=rxfs.readerValueByNode("/root/modifytime") %></div>
		<div class="div_content_fenge2"></div>
		<div>
			<div class="div_detail">
				<%=rxfs.readerValueByNode("/root/body") %>
			</div>
				
			</div>
				
				
		<%
				}else if(path.contains("achievement"))
				{
				
		%>
		<div class="div_content_title"><%=rxfs.readerValueByNode("/root/title") %></div>
		<div class="div_content_fenge1"></div>
		<div class="div_content_fenge2"></div>
			<table style="width:100%;">
						<tr>
							<td>摘要：<%=rxfs.readerValueByNode("/root/body") %>&nbsp;&nbsp;&nbsp;
								<a href="<%=rxfs.readerValueByNode("/root/source") %>" target="_blank"><font color="red">查看来源</font></a>
							</td>
						</tr>
						<tr>
							<td>时间：<%=rxfs.readerValueByNode("/root/modifytime") %>
							</td>
						</tr>
					
					
					</table>
				
		<%
				}
		}
		%>
      </div>
      	<div id="divmid">
      		
      	</div>
        <div id="divright" style="text-align:left;">
        		<c:forEach items="${requestScope.qust}" var="qust">
                 	<div class="newsitem">
                    	<div class="newstitle"><a href="<c:url value='/question/faq.jsp?pg=1&type=1&id=${qust.id }' />" title="${qust.question}">${fn:substring(qust.question,0,10)}</a>
                    	</div>
                    	<div class="newsdate">&nbsp;</div>
                    </div>
                 	</c:forEach>
        </div>
     	<div style="clear:left"></div>
      </div>
     
</body>
</html>